package com.tuniu.agents.common.service;

import java.util.List;
import java.util.concurrent.CompletableFuture;

import org.springframework.web.multipart.MultipartFile;

public interface FileProcessService {

    CompletableFuture<FileProcessResult> processFile(MultipartFile file);

    public record FileProcessResponse(
        boolean success,String errorCode,String msg,List<Data> data) {
    }

    public record Data(
        String url) {
    }

    public static class FileProcessResult {
        private final String processedContent;
        private final String uploadUrl;

        public FileProcessResult(String processedContent, String uploadUrl) {
            this.processedContent = processedContent;
            this.uploadUrl = uploadUrl;
        }

        public FileProcessResult() {
            this.processedContent = "";
            this.uploadUrl = "";
        }

        public String getProcessedContent() {
            return processedContent;
        }

        public String getUploadUrl() {
            return uploadUrl;
        }
    }

}
